this.BX=this.BX||{};this.BX.Landing=this.BX.Landing||{};this.BX.Landing.UI=this.BX.Landing.UI||{};(function(t,e,n,r){"use strict";var i,a,o,l,c;function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){babelHelpers.defineProperty(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var g=function(t){babelHelpers.inherits(e,t);function e(t){var r;babelHelpers.classCallCheck(this,e);r=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(e).call(this));r.setEventNamespace("BX.Landing.UI.Component.ActionPanel");r.options=p({},t);r.cache=new n.Cache.MemoryCache;var i=r.options,a=i.left,o=i.center,l=i.right;if(n.Type.isArray(a)){a.forEach((function(t){return r.addItem(p(p({},t),{},{align:"left"}))}))}if(n.Type.isArray(o)){o.forEach((function(t){return r.addItem(p(p({},t),{},{align:"center"}))}))}if(n.Type.isArray(l)){l.forEach((function(t){return r.addItem(p(p({},t),{},{align:"right"}))}))}if(n.Type.isDomNode(r.options.renderTo)){n.Dom.append(r.getLayout(),r.options.renderTo)}if(n.Type.isPlainObject(r.options.style)){n.Dom.style(r.getLayout(),r.options.style)}return r}babelHelpers.createClass(e,[{key:"getLayout",value:function t(){var e=this;return this.cache.remember("layout",(function(){return n.Tag.render(i||(i=babelHelpers.taggedTemplateLiteral(['\n\t\t\t\t<div class="landing-ui-component-action-panel">\n\t\t\t\t\t',"\n\t\t\t\t\t","\n\t\t\t\t\t","\n\t\t\t\t</div>\n\t\t\t"])),e.getLeftContainer(),e.getCenterContainer(),e.getRightContainer())}))}},{key:"getNode",value:function t(){return this.getLayout()}},{key:"getLeftContainer",value:function t(){return this.cache.remember("leftContainer",(function(){return n.Tag.render(a||(a=babelHelpers.taggedTemplateLiteral(['\n\t\t\t\t<div class="landing-ui-component-action-panel-left"></div>\n\t\t\t'])))}))}},{key:"getCenterContainer",value:function t(){return this.cache.remember("centerContainer",(function(){return n.Tag.render(o||(o=babelHelpers.taggedTemplateLiteral(['\n\t\t\t\t<div class="landing-ui-component-action-panel-center"></div>\n\t\t\t'])))}))}},{key:"getRightContainer",value:function t(){return this.cache.remember("rightContainer",(function(){return n.Tag.render(l||(l=babelHelpers.taggedTemplateLiteral(['\n\t\t\t\t<div class="landing-ui-component-action-panel-right"></div>\n\t\t\t'])))}))}},{key:"addItem",value:function t(e){var r=n.Tag.render(c||(c=babelHelpers.taggedTemplateLiteral(['\n\t\t\t<div \n\t\t\t\tclass="landing-ui-component-action-panel-button"\n\t\t\t\tonclick="','"\n\t\t\t\tdata-id="','"\n\t\t\t>',"</div>\n\t\t"])),e.onClick,e.id,n.Text.encode(e.text));if(e.align==="left"){n.Dom.append(r,this.getLeftContainer())}if(e.align==="center"){n.Dom.append(r,this.getCenterContainer())}if(e.align==="right"){n.Dom.append(r,this.getRightContainer())}}}]);return e}(r.EventEmitter);t.ActionPanel=g})(this.BX.Landing.UI.Component=this.BX.Landing.UI.Component||{},BX,BX,BX.Event);
//# sourceMappingURL=actionpanel.bundle.map.js